﻿@using TomNet.IMSC.Model.DbModels.Organization;
@{
    Layout = null;
    var entity = ViewBag.entity as List<StaffAuthority>;
    var StaffID = ViewBag.StaffID;
    var OneEntityZero = ViewBag.OneEntityZero as SelectList;
    var OneEntityOne = ViewBag.OneEntityOne as SelectList;
    var TowEntityZero = ViewBag.TowEntityZero as SelectList;
    var TowEntityOne = ViewBag.TowEntityOne as SelectList;
    var ThreeEntityZero = ViewBag.ThreeEntityZero as SelectList;
    var ThreeEntityOne = ViewBag.ThreeEntityOne as SelectList;
    var FourEntityZero = ViewBag.FourEntityZero as SelectList;
    var FourEntityOne = ViewBag.FourEntityOne as SelectList;
    var FiveEntityZero = ViewBag.FiveEntityZero as SelectList;
    var FiveEntityOne = ViewBag.FiveEntityOne as SelectList;
    var SixEntityZero = ViewBag.SixEntityZero as SelectList;
    var SixEntityOne = ViewBag.SixEntityOne as SelectList;
    var One = ViewBag.One;
    var Tow = ViewBag.Tow;
    var Three = ViewBag.Three;
    var Four = ViewBag.Four;
    var Five = ViewBag.Five;
    var Six = ViewBag.Six;
}
<!DOCTYPE html>
<html>

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">


    <title>H+ 后台主题UI框架 - 选项卡 &amp; 面板</title>

    <link rel="shortcut icon" href="favicon.ico">
    <link href="~/Content/Css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="~/Content/Css/font-awesome.css?v=4.4.0" rel="stylesheet">
    <link href="~/Content/Css/plugins/iCheck/custom.css" rel="stylesheet">
    <link href="~/Content/Css/animate.css" rel="stylesheet">
    <link href="~/Content/Css/style.css?v=4.1.0" rel="stylesheet">
    <style>
        label {
            width: 215px;
        }

        .i-checks {
            height: 455px;
        }
        /*.col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12 ,
        .col-xs-1, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6, .col-xs-7, .col-xs-8, .col-xs-9, .col-xs-10, .col-xs-11, .col-xs-12,
        .btn-group {
            border-style: solid;
            border-width: 1px;
            border-color: #000;
        }*/
        #MaxDiv {
            margin-bottom: 0px;
        }
    </style>
</head>

<body class="gray-bg">
    <div class="wrapper wrapper-content animated fadeIn" id="MaxDiv">
        <div class="row">
            <div class="col-sm-12">
                <form class="form-horizontal m-t" id="mainForm">

                    <input type="hidden" id="StaffID" name="StaffID" value="@StaffID" />

                    <div class="tabs-container">
                        <div class="tabs-left">
                            <ul class="nav nav-tabs">
                                <li class="active">
                                    <a data-toggle="tab" href="#tab-1"> @One</a>
                                </li>
                                <li class="">
                                    <a data-toggle="tab" href="#tab-2"> @Tow</a>
                                </li>
                                <li class="">
                                    <a data-toggle="tab" href="#tab-3"> @Three</a>
                                </li>
                                <li class="">
                                    <a data-toggle="tab" href="#tab-4"> @Four</a>
                                </li>
                                <li class="">
                                    <a data-toggle="tab" href="#tab-5"> @Five</a>
                                </li>
                                <li class="">
                                    <a data-toggle="tab" href="#tab-6"> @Six</a>
                                </li>
                            </ul>
                            <div class="tab-content">
                                <div id="tab-1" class="tab-pane active">
                                    <div class="panel-body">
                                        <div class="col-sm-12">
                                            <div class="row">
                                                <div class="col-sm-6">
                                                    <div class="panel panel-default">
                                                        <div class="panel-heading">
                                                            <div style="border-style: solid;border-width: 1px;border-color: #F3F3F3;">
                                                                权限
                                                                <div class="i-checks" style="height:30px; width:100px;float:right;">
                                                                    <label>
                                                                        <input type="checkbox" value="全选" name="OneJurisdictionSelect" id="OneJurisdictionSelect">全选
                                                                    </label>
                                                                </div>
                                                            </div>
                                                        </div>
                                                        @*style="overflow:scroll;"为div加滚动条*@
                                                        <div class="i-checks" style="overflow:scroll;" id="OneZeroDiv">
                                                            @foreach (SelectListItem item in OneEntityZero.Items)
                                                            {
                                                                if (entity.Where(a => a.AuthorityID == Convert.ToInt32(item.Value)).ToList().Count() > 0)
                                                                {
                                                                    <label class="checkbox-inline">
                                                                        <input type="checkbox" value="@item.Value" name="AuthorityID" checked>@item.Text
                                                                    </label>
                                                                }
                                                                else
                                                                {
                                                                    <label class="checkbox-inline">
                                                                        <input type="checkbox" value="@item.Value" name="AuthorityID">@item.Text
                                                                    </label>
                                                                }

                                                            }
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="col-sm-6">
                                                    <div class="panel panel-primary">
                                                        <div class="panel-heading">
                                                            <div style="border-style: solid;border-width: 1px;border-color: #1AB294;">
                                                                菜单
                                                                <div class="i-checks" style="height:30px; width:100px;float:right;">
                                                                    <label>
                                                                        <input type="checkbox" value="全选" name="OneMenuSelect" id="OneMenuSelect">全选
                                                                    </label>
                                                                </div>
                                                            </div>
                                                        </div>
                                                        <div class="i-checks" style="overflow:scroll;" id="OneOneDiv">
                                                            @foreach (SelectListItem item in OneEntityOne.Items)
                                                            {
                                                                if (entity.Where(a => a.AuthorityID == Convert.ToInt32(item.Value)).ToList().Count() > 0)
                                                                {
                                                                    <label class="checkbox-inline">
                                                                        <input type="checkbox" value="@item.Value" name="AuthorityID" checked>@item.Text
                                                                    </label>
                                                                }
                                                                else
                                                                {
                                                                    <label class="checkbox-inline">
                                                                        <input type="checkbox" value="@item.Value" name="AuthorityID">@item.Text
                                                                    </label>
                                                                }
                                                            }
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div id="tab-2" class="tab-pane">
                                    <div class="panel-body">
                                        <div class="col-sm-12">
                                            <div class="row">
                                                <div class="col-sm-6">
                                                    <div class="panel panel-default">
                                                        <div class="panel-heading">
                                                            <div style="border-style: solid;border-width: 1px;border-color: #F3F3F3;">
                                                                权限
                                                                <div class="i-checks" style="height:30px; width:100px;float:right;">
                                                                    <label>
                                                                        <input type="checkbox" value="全选" name="TowJurisdictionSelect" id="TowJurisdictionSelect">全选
                                                                    </label>
                                                                </div>
                                                            </div>
                                                        </div>
                                                        <div class="i-checks" style="overflow:scroll;" id="TowZeroDiv">
                                                            @foreach (SelectListItem item in TowEntityZero.Items)
                                                            {
                                                                if (entity.Where(a => a.AuthorityID == Convert.ToInt32(item.Value)).ToList().Count() > 0)
                                                                {
                                                                    <label class="checkbox-inline">
                                                                        <input type="checkbox" value="@item.Value" name="AuthorityID" checked>@item.Text
                                                                    </label>
                                                                }
                                                                else
                                                                {
                                                                    <label class="checkbox-inline">
                                                                        <input type="checkbox" value="@item.Value" name="AuthorityID">@item.Text
                                                                    </label>
                                                                }

                                                            }
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="col-sm-6">
                                                    <div class="panel panel-primary">
                                                        <div class="panel-heading">
                                                            <div style="border-style: solid;border-width: 1px;border-color: #1AB294;">
                                                                菜单
                                                                <div class="i-checks" style="height:30px; width:100px;float:right;">
                                                                    <label>
                                                                        <input type="checkbox" value="全选" name="TwoMenuSelect" id="TowMenuSelect">全选
                                                                    </label>
                                                                </div>
                                                            </div>
                                                        </div>
                                                        <div class="i-checks" style="overflow:scroll;" id="TowOneDiv">
                                                            @foreach (SelectListItem item in TowEntityOne.Items)
                                                            {
                                                                if (entity.Where(a => a.AuthorityID == Convert.ToInt32(item.Value)).ToList().Count() > 0)
                                                                {
                                                                    <label class="checkbox-inline">
                                                                        <input type="checkbox" value="@item.Value" id="AiHaoChangGe" name="AuthorityID" checked>@item.Text
                                                                    </label>
                                                                }
                                                                else
                                                                {
                                                                    <label class="checkbox-inline">
                                                                        <input type="checkbox" value="@item.Value" id="AiHaoChangGe" name="AuthorityID">@item.Text
                                                                    </label>
                                                                }

                                                            }
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div id="tab-3" class="tab-pane">
                                    <div class="panel-body">
                                        <div class="col-sm-12">
                                            <div class="row">
                                                <div class="col-sm-6">
                                                    <div class="panel panel-default">
                                                        <div class="panel-heading">
                                                            <div style="border-style: solid;border-width: 1px;border-color: #F3F3F3;">
                                                                权限
                                                                <div class="i-checks" style="height:30px; width:100px;float:right;">
                                                                    <label>
                                                                        <input type="checkbox" value="全选" name="ThreeJurisdictionSelect" id="ThreeJurisdictionSelect">全选
                                                                    </label>
                                                                </div>
                                                            </div>
                                                        </div>
                                                        <div class="i-checks" style="overflow:scroll;" id="ThreeZeroDiv">
                                                            @foreach (SelectListItem item in ThreeEntityZero.Items)
                                                            {
                                                                if (entity.Where(a => a.AuthorityID == Convert.ToInt32(item.Value)).ToList().Count() > 0)
                                                                {
                                                                    <label class="checkbox-inline">
                                                                        <input type="checkbox" value="@item.Value" id="AiHaoChangGe" name="AuthorityID" checked>@item.Text
                                                                    </label>
                                                                }
                                                                else
                                                                {
                                                                    <label class="checkbox-inline">
                                                                        <input type="checkbox" value="@item.Value" id="AiHaoChangGe" name="AuthorityID">@item.Text
                                                                    </label>
                                                                }

                                                            }
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="col-sm-6">
                                                    <div class="panel panel-primary">
                                                        <div class="panel-heading">
                                                            <div style="border-style: solid;border-width: 1px;border-color: #1AB294;">
                                                                菜单
                                                                <div class="i-checks" style="height:30px; width:100px;float:right;">
                                                                    <label>
                                                                        <input type="checkbox" value="全选" name="ThreeMenuSelect" id="ThreeMenuSelect">全选
                                                                    </label>
                                                                </div>
                                                            </div>
                                                        </div>
                                                        <div class="i-checks" style="overflow:scroll;" id="ThreeOneDiv">
                                                            @foreach (SelectListItem item in ThreeEntityOne.Items)
                                                            {
                                                                if (entity.Where(a => a.AuthorityID == Convert.ToInt32(item.Value)).ToList().Count() > 0)
                                                                {
                                                                    <label class="checkbox-inline">
                                                                        <input type="checkbox" value="@item.Value" id="AiHaoChangGe" name="AuthorityID" checked>@item.Text
                                                                    </label>
                                                                }
                                                                else
                                                                {
                                                                    <label class="checkbox-inline">
                                                                        <input type="checkbox" value="@item.Value" id="AiHaoChangGe" name="AuthorityID">@item.Text
                                                                    </label>
                                                                }

                                                            }
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div id="tab-4" class="tab-pane">
                                    <div class="panel-body">
                                        <div class="col-sm-12">
                                            <div class="row">
                                                <div class="col-sm-6">
                                                    <div class="panel panel-default">
                                                        <div class="panel-heading">
                                                            <div style="border-style: solid;border-width: 1px;border-color: #F3F3F3;">
                                                                权限
                                                                <div class="i-checks" style="height:30px; width:100px;float:right;">
                                                                    <label>
                                                                        <input type="checkbox" value="全选" name="FourJurisdictionSelect" id="FourJurisdictionSelect">全选
                                                                    </label>
                                                                </div>
                                                            </div>
                                                        </div>
                                                        <div class="i-checks" style="overflow:scroll;" id="FourZeroDiv">
                                                            @foreach (SelectListItem item in FourEntityZero.Items)
                                                            {
                                                                if (entity.Where(a => a.AuthorityID == Convert.ToInt32(item.Value)).ToList().Count() > 0)
                                                                {
                                                                    <label class="checkbox-inline">
                                                                        <input type="checkbox" value="@item.Value" id="AiHaoChangGe" name="AuthorityID" checked>@item.Text
                                                                    </label>
                                                                }
                                                                else
                                                                {
                                                                    <label class="checkbox-inline">
                                                                        <input type="checkbox" value="@item.Value" id="AiHaoChangGe" name="AuthorityID">@item.Text
                                                                    </label>
                                                                }

                                                            }
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="col-sm-6">
                                                    <div class="panel panel-primary">
                                                        <div class="panel-heading">
                                                            <div style="border-style: solid;border-width: 1px;border-color: #1AB294;">
                                                                菜单
                                                                <div class="i-checks" style="height:30px; width:100px;float:right;">
                                                                    <label>
                                                                        <input type="checkbox" value="全选" name="FourMenuSelect" id="FourMenuSelect">全选
                                                                    </label>
                                                                </div>
                                                            </div>
                                                        </div>
                                                        <div class="i-checks" style="overflow:scroll;" id="FourOneDiv">
                                                            @foreach (SelectListItem item in FourEntityOne.Items)
                                                            {
                                                                if (entity.Where(a => a.AuthorityID == Convert.ToInt32(item.Value)).ToList().Count() > 0)
                                                                {
                                                                    <label class="checkbox-inline">
                                                                        <input type="checkbox" value="@item.Value" id="AiHaoChangGe" name="AuthorityID" checked>@item.Text
                                                                    </label>
                                                                }
                                                                else
                                                                {
                                                                    <label class="checkbox-inline">
                                                                        <input type="checkbox" value="@item.Value" id="AiHaoChangGe" name="AuthorityID">@item.Text
                                                                    </label>
                                                                }

                                                            }
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div id="tab-5" class="tab-pane">
                                    <div class="panel-body">
                                        <div class="col-sm-12">
                                            <div class="row">
                                                <div class="col-sm-6">
                                                    <div class="panel panel-default">
                                                        <div class="panel-heading">
                                                            <div style="border-style: solid;border-width: 1px;border-color: #F3F3F3;">
                                                                权限
                                                                <div class="i-checks" style="height:30px; width:100px;float:right;">
                                                                    <label>
                                                                        <input type="checkbox" value="全选" name="FiveJurisdictionSelect" id="FiveJurisdictionSelect">全选
                                                                    </label>
                                                                </div>
                                                            </div>
                                                        </div>
                                                        <div class="i-checks" style="overflow:scroll;" id="FiveZeroDiv">
                                                            @foreach (SelectListItem item in FiveEntityZero.Items)
                                                            {
                                                                if (entity.Where(a => a.AuthorityID == Convert.ToInt32(item.Value)).ToList().Count() > 0)
                                                                {
                                                                    <label class="checkbox-inline">
                                                                        <input type="checkbox" value="@item.Value" id="AiHaoChangGe" name="AuthorityID" checked>@item.Text
                                                                    </label>
                                                                }
                                                                else
                                                                {
                                                                    <label class="checkbox-inline">
                                                                        <input type="checkbox" value="@item.Value" id="AiHaoChangGe" name="AuthorityID">@item.Text
                                                                    </label>
                                                                }

                                                            }
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="col-sm-6">
                                                    <div class="panel panel-primary">
                                                        <div class="panel-heading">
                                                            <div style="border-style: solid;border-width: 1px;border-color: #1AB294;">
                                                                菜单
                                                                <div class="i-checks" style="height:30px; width:100px;float:right;">
                                                                    <label>
                                                                        <input type="checkbox" value="全选" name="FiveMenuSelect" id="FiveMenuSelect">全选
                                                                    </label>
                                                                </div>
                                                            </div>
                                                        </div>
                                                        <div class="i-checks" style="overflow:scroll;" id="FiveOneDiv">
                                                            @foreach (SelectListItem item in FiveEntityOne.Items)
                                                            {
                                                                if (entity.Where(a => a.AuthorityID == Convert.ToInt32(item.Value)).ToList().Count() > 0)
                                                                {
                                                                    <label class="checkbox-inline">
                                                                        <input type="checkbox" value="@item.Value" id="AiHaoChangGe" name="AuthorityID" checked>@item.Text
                                                                    </label>
                                                                }
                                                                else
                                                                {
                                                                    <label class="checkbox-inline">
                                                                        <input type="checkbox" value="@item.Value" id="AiHaoChangGe" name="AuthorityID">@item.Text
                                                                    </label>
                                                                }

                                                            }
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div id="tab-6" class="tab-pane">
                                    <div class="panel-body">
                                        <div class="col-sm-12">
                                            <div class="row">
                                                <div class="col-sm-6">
                                                    <div class="panel panel-default">
                                                        <div class="panel-heading">
                                                            <div style="border-style: solid;border-width: 1px;border-color: #F3F3F3;">
                                                                权限
                                                                <div class="i-checks" style="height:30px; width:100px;float:right;">
                                                                    <label>
                                                                        <input type="checkbox" value="全选" name="SixJurisdictionSelect" id="SixJurisdictionSelect">全选
                                                                    </label>
                                                                </div>
                                                            </div>
                                                        </div>
                                                        <div class="i-checks" style="overflow:scroll;" id="SixZeroDiv">
                                                            @foreach (SelectListItem item in SixEntityZero.Items)
                                                            {
                                                                if (entity.Where(a => a.AuthorityID == Convert.ToInt32(item.Value)).ToList().Count() > 0)
                                                                {
                                                                    <label class="checkbox-inline">
                                                                        <input type="checkbox" value="@item.Value" id="AiHaoChangGe" name="AuthorityID" checked>@item.Text
                                                                    </label>
                                                                }
                                                                else
                                                                {
                                                                    <label class="checkbox-inline">
                                                                        <input type="checkbox" value="@item.Value" id="AiHaoChangGe" name="AuthorityID">@item.Text
                                                                    </label>
                                                                }

                                                            }
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="col-sm-6">
                                                    <div class="panel panel-primary">
                                                        <div class="panel-heading">
                                                            <div style="border-style: solid;border-width: 1px;border-color: #1AB294;">
                                                                菜单
                                                                <div class="i-checks" style="height:30px; width:100px;float:right;">
                                                                    <label>
                                                                        <input type="checkbox" value="全选" name="SixMenuSelect" id="SixMenuSelect">全选
                                                                    </label>
                                                                </div>
                                                            </div>
                                                        </div>
                                                        <div class="i-checks" style="overflow:scroll;" id="SixOneDiv">
                                                            @foreach (SelectListItem item in SixEntityOne.Items)
                                                            {
                                                                if (entity.Where(a => a.AuthorityID == Convert.ToInt32(item.Value)).ToList().Count() > 0)
                                                                {
                                                                    <label class="checkbox-inline">
                                                                        <input type="checkbox" value="@item.Value" id="AiHaoChangGe" name="AuthorityID" checked>@item.Text
                                                                    </label>
                                                                }
                                                                else
                                                                {
                                                                    <label class="checkbox-inline">
                                                                        <input type="checkbox" value="@item.Value" id="AiHaoChangGe" name="AuthorityID">@item.Text
                                                                    </label>
                                                                }

                                                            }
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>

                                <div class="form-group Submit" style="padding-right:15px;margin-top:15px;">
                                    <button id="submit" class="btn btn-primary pull-right" type="submit">
                                        <i class="fa fa-check"></i>&nbsp;提&nbsp;交
                                    </button>
                                </div>
                            </div>

                        </div>

                    </div>
                </form>
            </div>
        </div>

    </div>


    <!-- 全局js -->
    <script src="~/Scripts/jquery.min.js?v=2.1.4"></script>
    <script src="~/Scripts/bootstrap.min.js?v=3.3.6"></script>
    <!-- jQuery Validation plugin javascript-->
    <script type="text/javascript" src="~/Scripts/plugins/validate/jquery.validate.min.js"></script>
    <script type="text/javascript" src="~/Scripts/plugins/validate/messages_zh.min.js"></script>
    <script type="text/javascript" src="~/Scripts/Extensions/ExtValidator.js"></script>
    <!-- layer javascript -->
    <script type="text/javascript" src="~/Scripts/plugins/layer/layer.min.js"></script>

    <!-- 自定义js -->
    <script src="~/Scripts/content.js?v=1.0.0"></script>
    <!-- iCheck -->
    <script src="~/Scripts/plugins/iCheck/icheck.min.js"></script>


    <script type="text/javascript" src="http://tajs.qq.com/stats?sId=9051096" charset="UTF-8"></script>
    <!--统计代码，可删除-->
    <script type="text/javascript">
        $(function () {
            $('.i-checks').iCheck({
                checkboxClass: 'icheckbox_square-green',
                radioClass: 'iradio_square-green',
            });
            mix($('#OneJurisdictionSelect'), $("#OneZeroDiv").find("input[type=checkbox]"))
            mix($('#OneMenuSelect'), $("#OneOneDiv").find("input[type=checkbox]"))
            mix($('#TowJurisdictionSelect'), $("#TowZeroDiv").find("input[type=checkbox]"))
            mix($('#TowMenuSelect'), $("#TowOneDiv").find("input[type=checkbox]"))
            mix($('#ThreeJurisdictionSelect'), $("#ThreeZeroDiv").find("input[type=checkbox]"))
            mix($('#ThreeMenuSelect'), $("#ThreeOneDiv").find("input[type=checkbox]"))
            mix($('#FourJurisdictionSelect'), $("#FourZeroDiv").find("input[type=checkbox]"))
            mix($('#FourMenuSelect'), $("#FourOneDiv").find("input[type=checkbox]"))
            mix($('#FiveJurisdictionSelect'), $("#FiveZeroDiv").find("input[type=checkbox]"))
            mix($('#FiveMenuSelect'), $("#FiveOneDiv").find("input[type=checkbox]"))
            mix($('#SixJurisdictionSelect'), $("#SixZeroDiv").find("input[type=checkbox]"))
            mix($('#SixMenuSelect'), $("#SixOneDiv").find("input[type=checkbox]"))



            SelectState($('#OneJurisdictionSelect'), $("#OneZeroDiv").find("input[type=checkbox]"))
            SelectState($('#OneMenuSelect'), $("#OneOneDiv").find("input[type=checkbox]"))
            SelectState($('#TowJurisdictionSelect'), $("#TowZeroDiv").find("input[type=checkbox]"))
            SelectState($('#TowMenuSelect'), $("#TowOneDiv").find("input[type=checkbox]"))
            SelectState($('#ThreeJurisdictionSelect'), $("#ThreeZeroDiv").find("input[type=checkbox]"))
            SelectState($('#ThreeMenuSelect'), $("#ThreeOneDiv").find("input[type=checkbox]"))
            SelectState($('#FourJurisdictionSelect'), $("#FourZeroDiv").find("input[type=checkbox]"))
            SelectState($('#FourMenuSelect'), $("#FourOneDiv").find("input[type=checkbox]"))
            SelectState($('#FiveJurisdictionSelect'), $("#FiveZeroDiv").find("input[type=checkbox]"))
            SelectState($('#FiveMenuSelect'), $("#FiveOneDiv").find("input[type=checkbox]"))
            SelectState($('#SixJurisdictionSelect'), $("#SixZeroDiv").find("input[type=checkbox]"))
            SelectState($('#SixMenuSelect'), $("#SixOneDiv").find("input[type=checkbox]"))



            var icon = "<i class='fa fa-times-circle'></i> ";
            var validator = $("#mainForm").validate({
                rules: {
                },
                messages: {
                },
                submitHandler: function (form) {
                    //进行ajax传值
                    $.ajax({
                        url: '/Organization/Staff/JurisdictionAsync',
                        type: "post",
                        dataType: "json",
                        data: $('#mainForm').serialize(),
                        success: function (data) {
                            //Info,Success,Warning,Error
                            var type = data.type;
                            if (type == 1) {
                                layer.msg(data.content, { icon: 6, time: 2000 },
                                    function () {
                                        var index = parent.layer.getFrameIndex(window.name);
                                        parent.layer.close(index);
                                    });

                            } else {
                                layer.msg(data.content, { icon: 5, time: 2000 });
                            }
                        }
                    });
                }
            });
        });
        function SelectState(checkAll, checkboxs) {
            checkAll.iCheck('uncheck');
            var checked = true;
            for (var i = 0; i < checkboxs.length; i++) {
                if ($(checkboxs.get(i)).attr('checked') == undefined) {
                    checked = false;
                    break;
                }
            }
            if (checked) {
                checkAll.iCheck('check');
            }
        }
        function mix(checkAll, checkboxs) {
            var checkAll = checkAll;  //全选的input
            var checkboxs = checkboxs; //所有单选的input

            checkAll.on('ifChecked ifUnchecked', function (event) {
                if (event.type == 'ifChecked') {
                    checkboxs.iCheck('check');
                } else {
                    checkboxs.iCheck('uncheck');
                }
            });
            checkboxs.on('ifChanged', function (event) {
                if (checkboxs.filter(':checked').length == checkboxs.length) {
                    checkAll.prop('checked', true);
                } else {
                    checkAll.prop('checked', false);
                }
                checkAll.iCheck('update');
            })
        }
    </script>
</body>

</html>
